﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BuyThePeople.Models
{
    public class Goods
    {
        private T_GOODS good;
        public T_GOODS goods 
        {
            get
            {
                return good;
            }

            set
            {
                if (value == null)
                {
                    count = 0;
                }
                else
                {
                    DataModelsDataContext dmdc = new DataModelsDataContext();
                    count = dmdc.T_JOINTPURCHASE.Count(x => x.GoodsSeq == value.GoodsSeq);
                    good = value;
                }
            }
        }
        public List<T_COMMENT> commentList;
        public int count { get; set; }
    }
}




